/**
 * 全局常量、方法封装模块
 * 通过原型挂载到Vue属性
 * 通过this.Global调用
//  */
// import '../../public/static/serverconfig'
window.g = {

    IP: window.global_url.Base_url,
    URL: process.env.VUE_APP_BASE_API,
    RATEHEART: false,
    servicePort: 22357,
    // socketPort: 9204,
    // socketPort: 2223,
    socketPort: 22357,
    cameraPort: 8866,
    // 长春版本地址
    // ccIP: '192.168.3.198',
    // ccIP: '192.168.3.121',
    ccIp: window.global_url.Base_url,
    ccPort: 22357
}

const serverIp = window.g.IP
const servicePort = window.g.servicePort
const socketPort = window.g.socketPort
    // 后台服务器地址

export const serverIpA = window.g.IP + ':' + servicePort
export const baseUrl = window.g.URL
export const webSockUrl = 'ws://' + serverIp + ':' + socketPort + '/socket/websocket/socketServer.do'
    // export const webSockUrl = 'ws://' + serverIp + ':' + socketPort + '/websocket/socketServer.do'
export const webSockWarnUrl = 'ws://' + serverIp + ':' + servicePort + '/websocket/alarmPush.do'
export const webSockStatisticsUrl = 'ws://' + serverIp + ':' + socketPort + '/websocket/statistic'
export const webSockMonitorUrl = 'ws://' + serverIp + ':' + servicePort + '/realTimeCameraSocket/realTimeCamera'
export const cameraServerUrl = window.g.URL
export const statisticsUrl = window.g.URL
export const displaySearchUrl = window.g.URL
export const resourceAnalysisUrl = window.g.URL
export const dataBaseUrl = window.g.URL
export const TagManageUrl = window.g.URL
export const sysUserUrl = window.g.URL

export const webSockHomePage = 'ws://' + serverIp + ':' + servicePort + '/statDataSocket/resourceAndAlarmSocket'
    // 心率是否显示
export const rateHeartShow = window.g.RATEHEART

// 长春版本地址
export const ccUrl = `http://${window.g.ccIP}:${window.g.ccPort}`

export default {
    serverIpA,
    baseUrl,
    webSockUrl,
    webSockWarnUrl,
    webSockStatisticsUrl,
    cameraServerUrl,
    displaySearchUrl,
    resourceAnalysisUrl,
    dataBaseUrl,
    TagManageUrl,
    sysUserUrl,
    rateHeartShow,
    webSockHomePage,
    ccUrl
}